OTInitDNSAddress
Fills in aDNSAddress
structure with the data you provide.C INTERFACE
size_t OTInitDNSAddress (DNSAddress *addr, char *str);C++ INTERFACE
None. C++ clients use the C interface to this function.PARAMETERS
addr
- A pointer to a
DNSAddress
structure that you allocate. The function fills in this structure.str
- A pointer to a domain name string. This string can be just a host name (otteam), a partially qualified domain name (for example, "otteam.ssw"), a fully qualified domain name (for example, "otteam.ssw.apple.com."), or an internet address in dotted-
decimal format (for example, "17.202.99.99"), and can optionally include the port number (for example, "otteam.ssw.apple.com:25" or "17.202.99.99:25").DESCRIPTION
This function fills in thefAddressType
field of theDNSAddress
structure with the valueAF_DNS
, fills in thefName
field with the address string you specify, and returns the size of the resultingDNSAddress
structure as an unsigned integer. You can use theDNSAddress
structure to provide an address when you use a UDP or TCP endpoint. If you do so, the domain name resolver resolves the address for you automatically.SEE ALSO
TheDNSAddress
structure is described in "DNS Address Structure" on page 8-23.